
uniform sampler2D texture;
uniform float time;

varying vec4 vertex;

void main()
{
		
	//vec2 texCoord = gl_TexCoord[0].xy;
	vec2 texCoord;
	texCoord.x = abs(cos(time/10.0 + vertex.x/3.0))/3.0;
	texCoord.y = abs(sin(vertex.y/3.0))/3.0;
	
	vec4 c = texture2D(texture, texCoord);
	
	//vec4 color = texture2D(texUnit,gl_TexCoord[0].st);
	//gl_FragColor = vertex;
	//gl_FragColor = gl_FragColor;
	gl_FragColor = c;
	//gl_FragColor = vec4(texCoord.x,0.0,0.0,1.0);

}
